﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace bdnt_pets_system_Entity
{
     [DataContract]
    public class Tbl_Team : INotifyPropertyChanged
    {
        Int32 id;
        [DataMember]
        public Int32 Id {
            get { return id; }
            set { id = value; }
        }

        string teamNo;
        [DataMember]
        [Required(ErrorMessage = "*")]
        public string TeamNo {
            get { return teamNo; }
            set
            {
                if (teamNo != value)
                {
                    Validator.ValidateProperty(value,
                        new ValidationContext(this, null, null) { MemberName = "teamNo" });
                    teamNo = value;
                    this.OnPropertyChanged("teamNo");
                }
            }
        }

        string teamName;
        [DataMember]
        [Required(ErrorMessage = "*")]
        public string TeamName {
            get { return teamName; }
            set
            {
                if (teamName != value)
                {
                    Validator.ValidateProperty(value,
                        new ValidationContext(this, null, null) { MemberName = "teamName" });
                    teamName = value;
                    this.OnPropertyChanged("teamName");
                }
            }
        }

        Int32 teamType;
        [DataMember]
        [Required(ErrorMessage = "*")]
        public Int32 TeamType {
            get { return teamType; }
            set
            {
                if (teamType != value)
                {
                    Validator.ValidateProperty(value,
                        new ValidationContext(this, null, null) { MemberName = "teamType" });
                    teamType = value;
                    this.OnPropertyChanged("teamType");
                }
            }
        }

        string deptNo;
        [DataMember]
        [Required(ErrorMessage = "*")]
        public string DeptNo {
            get { return deptNo; }
            set
            {
                if (deptNo != value)
                {
                    Validator.ValidateProperty(value,
                        new ValidationContext(this, null, null) { MemberName = "deptNo" });
                    deptNo = value;
                    this.OnPropertyChanged("deptNo");
                }
            }
        }

        string remark;
        [DataMember]
        public string Remark {
            get { return remark; }
            set { remark = value; }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string PropName)
        {
            if (PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(PropName));
            }
        }
    }
}
